﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Cucumber : Enemy,IDamageable
{
    public void Gethit(float damage)
    {
        health -= damage;
        if (health <1)
        {
            health = 0;
            isDead = true;
        }
        anim.SetTrigger("hit");
    }

    public void Setoff() //这是一个作用于动画的函数
    {
        targetPoint.GetComponent<Bomb>()?.Turnoff();
       
       }
   
}
